package com.juicygames.framework.draw.drawservice;

import com.juicygames.framework.action.DrawAction;
import com.juicygames.framework.gamepart.GameHandler;

public class DrawHandler extends GameHandler<DrawAction> {
	
	DrawService drawService;
	
	public void load() {
		drawService = (DrawService)parent;
	}
	
	public Class<DrawAction> getActionClassHandled() {
		return DrawAction.class;
	}

	public void handle(DrawAction draw) {
		for (Drawable drawable : drawService.getDrawables()) {
			draw.apply(drawable.entity);
		}
	}
	

}
